package com.weilai.dao;

import com.weilai.domain.Categories;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CategoriesDao {

    //按id查询帖子分类
    @Select("select * from  categories where id=#{id}")
    public Categories selectById(int id);
    //按name查询帖子分类
    @Select("select * from  categories where name=#{name}")
    public Categories selectByName(String name);

}
